<div class="main-content">
	<div class="breadcrumbs" id="breadcrumbs">
		<script type="text/javascript">
			try{ace.settings.check('breadcrumbs' , 'fixed')}catch(e){}
		</script>

		<!-- .breadcrumb -->
	</div>
	<!-- Main content -->
	<div class="page-content">
    	<div class="row">
    	    <div class="page-header">
    			<h1>车贴记录列表</h1>
    		</div>
    		<div class=" col-md-12 col-sm-12 col-xs-12 form">
                <div class="row">
                <form action="<?php echo base_url().'admin/user/car'?>" method="get">
                    <div class="wh">
                    	<label>车牌号码：</label>
                        <input type="text" name="number" value="<?php if (isset($number))echo $number;?>" />
                    </div>
                    <div class="wh">
                    	<label>手机号码：</label>
                        <input type="text"  name="user_phone" value="<?php if (isset($user_phone))echo $user_phone;?>"/>
                    </div>
					<div class="wh">
                    	<label>审核状态：</label>
                        <select name="status">
							<option value="-1">全部</option>
							<option value="0"  <?php if($status==0):?>selected="selected"<?php endif;?>>待审核</option>
							<option value="1" <?php if($status==1):?>selected="selected"<?php endif;?>>审核完成</option>
						</select>
                    </div>
                    <div class="wh">
                        <button class="btn btn-sm btn-info" type="submit"><i class="icon-search"></i>查询</button>
                    </div> 
                </form>
                </div>
            </div>
            <div class="col-xs-12 margin_t margin_b">
				<div class="table-responsive  tab">
					<table id="sample-table-1" class="table table-striped table-bordered table-hover">
						<thead>
							<tr>
								<th class="center" style="width: 3%;">
									<label>
										<input type="checkbox" class="ace" />
										<span class="lbl"></span>
									</label>
								</th>
								<th>手机号码</th>
                                <th>车牌号码</th>
                                <th>上传次数</th>
                                <th>待审次数</th>
                                <th>审核状态</th>
                                <th>创建时间</th>
                                <th style="width: 25%;">操作</th>
							</tr>
						</thead> 
						<tbody>
						<?php if (isset($result)&&count($result)>0){
                            	foreach ($result as $app){
                            	?>
							<tr>
								<td class="center">
                                	<p>
									<label>
										<input type="checkbox" class="ace" name="num[]" value="<?php echo $app->id;?>"/>
										<span class="lbl"></span>
									</label>
                                    </p>
								</td>
                                <td><p><?php echo $app->login_name;?></p></td>
                                <td><p><?php echo $app->car_card;?></p></td>
                                <td><p><?php echo $app->count;?></p></td>
                                <td><p><?php echo $app->count1;?></p></td>
                                <td><p><?php 
                                	if($app->status == 0){
                                		echo "待审核";
                                	}elseif($app->status == 1){
                                		echo "审核完成";
                                	}
                                	?></p>
                                </td>
                                <td><p><?php echo $app->create_time;?></p></td>
                                <td>
                                	<p>
                                	<a class="btn btn-sm btn-info" href="<?php echo base_url().'admin/user/car_edit/'.$app->id;?>"><i class="icon-edit"></i>编辑</a>
                                    <a href="<?php echo base_url().'admin/user/car_img/'.$app->id;?>" class="btn btn-info btn-sm"><i class="icon-list"></i>审核查看</a>
                                    <a href="javascript:void(0)" onclick="delmodal('<?php echo $app->id;?>')" data-toggle="modal" class="btn btn-danger btn-sm"><i class="icon-trash"></i>删除</a>
                                    </p>
                                </td>
    						</tr>
    						<?php }
                            }else{?>
                            <tr>
                            	<td colspan="11">无数据</td>
                            </tr>
                            <?php }?>
                            </tbody>
                         </table>
                     </div><!-- /.table-responsive -->
				</div>
                <div class="col-sm-12">
                	<div class="modal-footer no-margin-top">
	                	<div class="pull-left record">
							共<?php echo $count;?>条记录
	                    </div>
                		<?php if (isset($page))echo $page;?>
                	</div>
                </div>
            </div><!-- /.row -->
		</div><!-- /.page-content -->
	</div><!-- /.main-content -->
	<div id="delModal" class="modal fade" role="dialog" aria-hidden="true">
		<div class="modal-dialog" style="width: 300px">
			<div class="modal-content">
				<div class="modal-header">
				  <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
				  <h3>提示信息</h3>
				</div>
				<div class="modal-body">
				  <p>确定要删除吗？</p>
				</div>
				<div class="modal-footer">
				  <a id="delbtn" href="#" class="btn btn-danger">确定</a>
				  <a href="#" class="btn btn-info" data-dismiss="modal" aria-hidden="true">取消</a>
				</div>
			</div>
		</div>
	</div>
	<script type="text/javascript">
	function delmodal(id){
		$("#delbtn").attr('href','<?php echo base_url().'admin/user/del_user_car/'?>'+id);
	    $('#delModal').modal('show');
	}
	</script>